import java.io.Serializable;

public class PLAttrib implements Serializable {
	private static final long serialVersionUID = 1L;

	// number of shapes seen so far
	protected int mNum = 0;

	public PLAttrib() {}	

	public int GetNum() {return mNum;}
	public void IncNum() {++mNum;}


	// builds a response from the saved attributes
	public float BuildResponse(PLShape inQuery, PLOutShape outResponse) {return 0;}

	// updates the attributes for the query and response
	public void UpdateAttribs(PLShape inQuery, PLShape inResponse) {

		Update(inQuery, inResponse);
		IncNum();

	}

	public static PLAttrib GetAttribByType(PLShape.ShapeIdT qId, PLShape.ShapeIdT rId) {
		switch (rId) {
			case kLine: {
				switch (qId) {
					case kLine : return new PLAttribLineLine();
					default : return null;
				}
			}
			default: {
				PLDebug.Err("Invalid response type %s", rId);
			}
						
		}
		return null;
	}


	// PROTECTED 
	protected void Update(PLShape inQuery, PLShape inResponse) {
		// this is intenetionally left blank
	} 
}

